#include <assert.h>
#include "cooperatordao_factory.h"
#include "cooperatordao_stub4web.h"
#include "cooperatordao_stub4app.h"
//#include "cooperatordao.h"

using namespace b2b2c::cooperator::dao;

bool CCooperatorDaoFactory::s_CooperatorDaoInit = false;

ICooperatorDao* CCooperatorDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CCooperatorDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_CooperatorDaoInit)
        {
            int iRetCode = CCooperatorDao::Initialize();
            assert(iRetCode == 0);
            s_CooperatorDaoInit = true;
        }   	
        return (new CCooperatorDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

ICooperatorDaoAsyc* CCooperatorDaoFactory::GetAsycObject()
{
	return (new CCooperatorDaoStub4App);
}
